define(function() {
    'use strict';
    
    return function (localData){
        return localData.reduce((start,val)=>{
            return val.flag ? start + val.price*val.num : start;
        }, 0)
    }
    
});